package jp.dodododo.reloadable.servlet.impl;

import java.io.IOException;

import javax.servlet.GenericServlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

import jp.dodododo.reloadable.servlet.ServletWrapper;

public class ServletWrapperImpl extends GenericServlet implements ServletWrapper {
	private static final long serialVersionUID = 1L;

	private ServletWrapperDelegator delegator = new ServletWrapperDelegator();

	@Override
	public void init(ServletConfig servletConfig) throws ServletException {
		delegator.init(servletConfig);
	}

	@Override
	public void destroy() {
		delegator.destroy();
	}

	@Override
	public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException {
		delegator.service(request, response);
	}

	public void initTarget() throws Exception {
		delegator.initTarget();
	}

	public void destroyTarget() {
		delegator.destroyTarget();
	}
}
